using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace JTest.GUI
{
    public partial class frmConfirmEndPractice : Form
    {
        static object ownerForm;
        public frmConfirmEndPractice()
        {
            InitializeComponent();
        }

        public frmConfirmEndPractice(object o)
        {
            InitializeComponent();
            ownerForm = o;
        }
        /// <summary>
        /// Ham delegate thong bao lua chon cua user ve man hinh luyen tap
        /// </summary>
        /// <param name="b"></param>
        public delegate void savePracticeInfo(int b);

        private void btLuu_Click(object sender, EventArgs e)
        {
            savePracticeInfo b = new savePracticeInfo(((frmPractice)ownerForm).setSavePracticeOption);
            b(1);//Luu ket qua luyen tap
            this.Dispose();
        }

        private void btKhongLuu_Click(object sender, EventArgs e)
        {
            savePracticeInfo b = new savePracticeInfo(((frmPractice)ownerForm).setSavePracticeOption);
            b(2);//Khong luu ket qua luyen tap
            this.Dispose();
        }

        private void btHuy_Click(object sender, EventArgs e)
        {
            savePracticeInfo b = new savePracticeInfo(((frmPractice)ownerForm).setSavePracticeOption);
            b(3);//Huy
            this.Dispose();
        }
    }
}